<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!--bootstrap插件-->
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <link href="/static/plugin/bootstrap/bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet"/>
    <link href="/static/plugin/jo/joUI.css" rel="stylesheet"/>
    <!--字体插件-->
    <link href="/static/plugin/font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
    <link href="/static/plugin/layui-2.4.3/css/layui.css" rel="stylesheet"/>
    <!--ztree-->
    <link href="/static/plugin/zTree/css/metroStyle/metroStyle.css" rel="stylesheet"/>
    <!--common-->
    <link href="/static/css/common.css" rel="stylesheet"/>
    <title>投票结果表单</title>
</head>
<body>
<div class="container-fluid">
    <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
            <!--按钮栏-->
            <div class="form-group button-bar button-bar">
                <button type="button" isShow="joForm.isAdd" class="btn btn-primary" onclick="joForm.save()">
                    <i class="fa fa-plus-circle" aria-hidden="true"></i>&nbsp;新增
                </button>
                <button type="button" isShow="!joForm.isAdd" class="btn btn-info" onclick="joForm.update()">
                    <i class="fa fa-pencil-square" aria-hidden="true"></i>&nbsp;修改
                </button>
                <button type="button" isShow="!joForm.isAdd" class="btn btn-danger" onclick="joForm.del()">
                    <i class="fa fa-trash" aria-hidden="true"></i>&nbsp;删除
                </button>
            </div>
            <!--按钮栏-->
        </div>
    </div>
    <div class="row">
        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
            <form id="pageForm" name="pageForm" action="" method="post">
                <!--<div class="young-form-item col-md-6 must">
                    <div class="young-form-label">主键</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <input type="text"   name="id" value="" class="form-control readonly-edit"  ErrEmpty="主键不允许为空" />
                    </div>
                </div>-->
                <div class="young-form-item col-md-6 must">
                    <div class="young-form-label">投票信息</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <input type="text"   name="voteId" value="" class="form-control "  ErrEmpty="投票信息不允许为空" />
                    </div>
                </div>
                <div class="young-form-item col-md-6 ">
                    <div class="young-form-label">投票结果</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <input type="text"   name="voteOptionId" value="" class="form-control "   />
                    </div>
                </div>
                <div class="young-form-item col-md-6 must">
                    <div class="young-form-label">投票者</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <input type="text"   name="voterId" value="" class="form-control "  readonly />
                    </div>
                </div>
                <div class="young-form-item col-md-6 ">
                    <div class="young-form-label">投票时间</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <input type="text" id="voteTime" value="" name="voteTime" class="form-control "   />
                    </div>
                </div>
                <div class="young-form-item col-md-6 ">
                    <div class="young-form-label">比特承诺数</div>
                    <div class="young-form-tips"><span class="fa fa-info-circle" onmouseover="window.tipsIdx=jo.tips('投票者进行比特承诺的比特值',this,{tips:[2, '#3595CC'], time:10000});" onmouseout="jo.close(window.tipsIdx);"></span></div>
                    <div class="young-form-input-block">
                        <input type="text"   name="bitPromise" value="" class="form-control "   />
                    </div>
                </div>
                <div class="young-form-item col-md-6 ">
                    <div class="young-form-label">比特承诺结果</div>
                    <div class="young-form-tips"><span class="fa fa-info-circle" onmouseover="window.tipsIdx=jo.tips('比特承诺结果',this,{tips:[2, '#3595CC'], time:10000});" onmouseout="jo.close(window.tipsIdx);"></span></div>
                    <div class="young-form-input-block">
                        <input type="text"   name="bitValue" value="" class="form-control "   />
                    </div>
                </div>
                <div class="young-form-item col-md-6 ">
                    <div class="young-form-label">投票者公钥</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <textarea  name="voterPublicKey" value="" class="form-control "   ></textarea>
                    </div>
                </div>
                <div class="young-form-item col-md-6 ">
                    <div class="young-form-label">投票者私钥</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <textarea  name="voterPrivateKey" value="" class="form-control "   ></textarea>
                    </div>
                </div>
                <div class="young-form-item col-md-6 ">
                    <div class="young-form-label">盲化结果</div>
                    <div class="young-form-tips"><span class="fa fa-info-circle" onmouseover="window.tipsIdx=jo.tips('投票者对经比特承诺后的结果执行盲化处理的结果',this,{tips:[2, '#3595CC'], time:10000});" onmouseout="jo.close(window.tipsIdx);"></span></div>
                    <div class="young-form-input-block">
                        <input type="text"   name="blindValue" value="" class="form-control "   />
                    </div>
                </div>
                <div class="young-form-item col-md-6 ">
                    <div class="young-form-label">管理员公钥</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <textarea  name="adminPublicKey" value="" class="form-control "   ></textarea>
                    </div>
                </div>
                <div class="young-form-item col-md-6 ">
                    <div class="young-form-label">管理员私钥</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <textarea  name="adminPrivateKey" value="" class="form-control "   ></textarea>
                    </div>
                </div>
                <div class="young-form-item col-md-6 ">
                    <div class="young-form-label">管理员签名结果</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <textarea  name="adminSignValue" value="" class="form-control "   ></textarea>
                    </div>
                </div>
                <div class="young-form-item col-md-6 ">
                    <div class="young-form-label">管理员签名时间</div>
                    <div class="young-form-tips"><span class="fa fa-info-circle" onmouseover="window.tipsIdx=jo.tips('管理员对投票结果进行签名认证',this,{tips:[2, '#3595CC'], time:10000});" onmouseout="jo.close(window.tipsIdx);"></span></div>
                    <div class="young-form-input-block">
                        <input type="text" id="adminSignTime" value="" name="adminSignTime" class="form-control "   />
                    </div>
                </div>
                <div class="young-form-item col-md-6 ">
                    <div class="young-form-label">计票中心结果值</div>
                    <div class="young-form-tips"><span class="fa fa-info-circle" onmouseover="window.tipsIdx=jo.tips('最终流转给计票中心的选票结果',this,{tips:[2, '#3595CC'], time:10000});" onmouseout="jo.close(window.tipsIdx);"></span></div>
                    <div class="young-form-input-block">
                        <textarea  name="countCenterValue" value="" class="form-control "   ></textarea>
                    </div>
                </div>
                <div class="young-form-item col-md-6 ">
                    <div class="young-form-label">计票中心计票时间</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <input type="text" id="countCenterTime" value="" name="countCenterTime" class="form-control "   />
                    </div>
                </div>
                <div class="young-form-item col-md-6 ">
                    <div class="young-form-label">状态</div>
                    <div class="young-form-tips"></div>
                    <div class="young-form-input-block">
                        <select name="state" value="" class="form-control" >
                            <option value=""></option>
                            <option value="1">发起投票</option>
                            <option value="2">管理员签名</option>
                            <option value="3">计票中心计票</option>
                        </select>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

<!--配置信息-->
<script src="/static/js/config.js"></script>
<!--jquery-->
<script src="/static/plugin/jquery/jquery-3.3.1.js"></script>
<script src="/static/plugin/jquery/jquery.cookie.js"></script>
<!--bootstrap-->
<script src="/static/plugin/bootstrap/bootstrap-3.3.7-dist/js/bootstrap.min.js"></script>
<!--[if lt IE 9]>
<script src="/static/plugin/other/html5shiv.js"></script>
<script src="/static/plugin/other/respond.min.js"></script>
<![endif]-->
<!--layui-->
<script src="/static/plugin/layui-2.4.3/layui.all.js"></script>
<!--ztree-->
<script src="/static/plugin/zTree/js/jquery.ztree.all.js"></script>
<!--common-->
<script src="/static/js/common.js"></script>
<!--jo-->
<script src="/static/plugin/jo/jo.js"></script>
<script src="/static/plugin/jo/jo-adapt.js"></script>
<script src="/static/plugin/jo/jo-page-view.js"></script>
<script src="/static/plugin/jo/jo-page-form.js"></script>
<script src="/static/plugin/jo/jo-listener.js"></script>
<script type="text/javascript">
    layui.laydate.render({
        elem: '#voteTime' //注册日期控件
    });
    layui.laydate.render({
        elem: '#adminSignTime' //注册日期控件
    });
    layui.laydate.render({
        elem: '#countCenterTime' //注册日期控件
    });
    $(function(){
        var jParams = {
            "PKName" : "id",//主键属性名
            "saveAfter" : "toEdit",
            "addUrl" : "/bs/vote/voteResult/insert",//新增
            "deleteUrl" : "/bs/vote/voteResult/delete",//删除
            "updateUrl" : "/bs/vote/voteResult/update",//修改
            "formDataUrl" : "/bs/vote/voteResult/get",//查询
            //"readonly2Label" : true //只读转文本
        };
        joForm.initFormPage(jParams);//初始化
    });
    //初始化新增页面回调函数(在初始化按钮前发生)
    joForm.initFormPageOfAdd = function(){

    };
    //初始化表单值前处理
    joForm.initFormValueBefore = function(oJson){
            oJson.voteTime = jo.formatTime(oJson.voteTime);
            oJson.adminSignTime = jo.formatTime(oJson.adminSignTime);
            oJson.countCenterTime = jo.formatTime(oJson.countCenterTime);
    };
    //初始化表单值后处理
    joForm.initFormValueAfter = function(oJson){

    };
    //新增请求提交前回调函数
    joForm.dealDataAtSaveBefore = function(oJson){

    };
    //修改请求提交前回调函数
    joForm.dealDataAtUpdateBefore = function(oJson){

    };
    /* 关于joForm更多回调函数和配置参数可查看jo-page-form.js */
</script>
</body>
</html>
